from django.test import TestCase

import os

if __name__ == '__main__':
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'library.settings')
    import django

    django.setup()
    from app01 import models

    books = models.Book.objects.all()
    print(books[2].authors.all().values_list('name'))
    print(books[0].publish_date.date())
    print(type(books[0].publish_date.date()))
